package com.zenithmind.library.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 图书评价创建DTO
 * 
 * @author ZenithMind
 * @since 2024-06-14
 */
@Data
@Schema(name = "图书评价创建DTO", description = "创建图书评价时的数据传输对象")
public class BookReviewCreateDTO {

    @NotBlank(message = "用户ID不能为空")
    @Schema(description = "用户ID", example = "1", required = true)
    private String userId;

    @NotBlank(message = "图书ID不能为空")
    @Schema(description = "图书ID", example = "1", required = true)
    private String bookId;

    @NotNull(message = "评分不能为空")
    @Min(value = 1, message = "评分不能小于1")
    @Max(value = 5, message = "评分不能大于5")
    @Schema(description = "评分 (1-5)", example = "5", required = true)
    private Integer rating;

    @Schema(description = "评价内容", example = "这本书很不错，内容丰富，值得推荐！")
    private String reviewContent;

    @Schema(description = "是否匿名 (0-否, 1-是)", example = "0")
    private Integer isAnonymous;
}
